#ifndef RESULTIMAGEITEM_H
#define RESULTIMAGEITEM_H

#include <QGraphicsLineItem>
#include <QPainter>

class ResultImageItem : public QGraphicsPixmapItem
{
public:
    ResultImageItem(QWidget *parent = nullptr);

protected:
    void paint(QPainter * painter,
                                const QStyleOptionGraphicsItem * option,
                                QWidget * widget);
    QRectF boundingRect() const;

private:
    void                InitDatas();

private:
    QPolygon            m_objLineLeftTop;
    QPolygon            m_objLineRightBottom;
    QPolygon            m_objBorder;
    QList<QPoint>       m_lstCenters;
    QPolygon            m_lstTriangle;
    QList<QPoint>       m_lstDecoration;

    QPoint              m_ptText;

    int                 m_nImageResult;

public:
    void                SetImageResult(int nRet);

public:
    int w, h;
};

#endif // RESULTIMAGEITEM_H
